<script setup lang="ts">
import { RouterView } from 'vue-router'
// console.log(import.meta.env)
// import { Button as VanButton } from 'vant'
// import { useUserStore } from './stores'
// import { request } from './utils/request'
// import { type User } from './types/user'
// const store = useUserStore()
// 401的例子
// request('/patient/home/knowledge', 'get', {
//   type: 'recommend',
//   current: 1,
//   pageSize: 10
// })
// 测试，响应拦截器，出现非10000的情况，和返回剥离后的数据
// const login = async () => {
//   const res = await request<User>('/login/password', 'POST', {
//     mobile: '13211112222',
//     // 密码 abc123456 测试：出现非10000的情况
//     password: 'abc12345'
//   })
//   console.log(res.data.id)

//   store.setUser(res.data)
// }
// login()
</script>

<template>
  <!-- <van-button
    type="primary"
    @click="
      store.setUser({
        token: '1111',
        id: '222',
        account: '3333',
        mobile: '333444',
        avatar: 'dfdsfds'
      })
    "
    >设置user</van-button
  >

  <van-button type="primary" @click="store.delUser">删除user</van-button>
  <a href="">测试样式</a>
  <div class="footer">
    <a href="">测试第二个样式</a>
  </div> -->
  <RouterView />
</template>

<style>
:root {
  --main-color: #069;
}
.footer {
  --footer-color: #f40;
}

a {
  color: var(--footer-color);
}
</style>
